import pytest


def read_yaml():
    return ['1', '2', '3']


@pytest.fixture(scope="function", autouse=True, params=read_yaml(), ids=['a', 'b', 'c'], name='db')
def exe_database_sql(request):
    print(request.param)
    print("执行数据库sql查询")
    yield request.param
    print("关闭数据库连接")


@pytest.fixture(scope="function", autouse=True, name='um')
def user_manage():
    print("用户管理模块之前的准备工作")
    yield "user_manage"
    print("用户管理模块之后的准备工作")
